<template>
  <div class="blank-container">
    <img :src="src" class="blank-icon" />
    <div class="text">{{ text }}</div>
    <div class="sub">{{ sub }}</div>
    <slot />
  </div>
</template>

<script>
import src from "./images/blank_icon.png";

export default {
  name: "BlankPage",
  props: {
    text: {
      type: String,
      default: "暂时没有数据~",
    },
    sub: {
      type: String,
      default: "",
    },
    src: {
      type: String,
      default: src,
    },
  },
};
</script>
 
<style lang="less" scoped>
.blank-container {
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #eee;
}
.blank-icon {
  width: 100px;
  height: 100px;
}
.text {
  padding-top: 24px;
  padding-bottom: 8px;
  font-size: 24px;
}
.sub {
  font-size: 20px;
  opacity: 0.5;
}
</style>